package com.solo.system.dubbo;

import com.solo.system.api.SysRoleApi;
import com.solo.system.api.entity.SysRole;
import com.solo.system.mapper.SysRoleMapper;
import lombok.RequiredArgsConstructor;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 系统角色远程调用实现类
 * @author 十一
 * @since 2023/11/30 10:51
 * 人生若只如初见，何事秋风悲画扇
 **/
@Service
@DubboService
@RequiredArgsConstructor
public class SysRoleApiImpl implements SysRoleApi {

    private final SysRoleMapper sysRoleMapper;

    @Override
    public List<SysRole> selectRolePermissions(Long userId) {
        return sysRoleMapper.selectRoles(userId);
    }

}
